#include <iostream>
#include <string>
#include <memory>
#include "HttpServer.hpp"
#include "MyDaemon.hpp"
static void Usage(const std::string &proc)
{
    std::cout << std::endl
              << "Usage: " << proc << " port" << std::endl
              << std::endl;
}
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(4);
    }
    int port = atoi(argv[1]);

    MyDaemon("/home/lhr/http-server");

    std::shared_ptr<HttpServer> http_server(new HttpServer(port));
    http_server->Start();

    return 0;
}
